<?php
$yhendus=new mysqli("localhost", "if11", "4e3HtHTXGXQC8uas", "if11_maas21");
	$kask=$yhendus->prepare("SELECT toonimi, tahtaeg, staatus FROM tooajad");
	$kask->bind_result($toonimi, $tahtaeg, $staatus);
	$kask->execute();
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
      <title>Direktori leht</title>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" media="screen" href="style.css" />
</head>
<body>
<div id="Direktortable">
<h1>Koristaja koristustabel</h1>
<table>

 
		<tr>
			<th>Töönimi</th>
			<th>Tähtaeg</th>
			<th>Staatus</th>
		</tr>

    
    <?php
    	while($kask->fetch()){
				echo "<tr>
					<td>$toonimi</td>
					<td>$tahtaeg</td>
					<td>$staatus</td>
					</tr>
					";
		}
	?>
   	 </table>
</div>
</body>
</html>